<?php

namespace app\common\model;

use app\company\model\DealerStore;
use think\model\relation\BelongsTo;
use think\model\relation\HasMany;

class Store extends BaseModel
{
    public function region(): BelongsTo
    {
        return $this->belongsTo(Region1::class, 'region_id', 'id');
    }

    public function salesman(): HasMany
    {
        return $this->hasMany(SalesmanStore::class, 'store_id','id');
    }

    public function dealer(): HasMany
    {
        return $this->hasMany(DealerStore::class, 'store_id','id');
    }
}